import request from '@/sheep/request';

export default {
   	//请假申请列表
	getLeaveList: (params) =>
    request({
        url: 'api/ask_leave/index',
        method: 'GET',
        params,
        custom: {
            showSuccess: false,
			successMsg: '',
			showError: true,
			errorMsg: '',
			showLoading: true,
			loadingMsg: '加载中',
			auth: true,
        },
    }),
    //请假添加
	postLeaveAdd: (params) =>
    request({
        url: 'api/ask_leave/add',
        method: 'POST',
        params,
        custom: {
            showSuccess: true,
			successMsg: '',
			showError: true,
			errorMsg: '',
			showLoading: false,
			loadingMsg: '加载中',
			auth: true,
        },
    }),
    // 请假详情
    getLeaveView: (params) =>
		request({
			url: 'api/ask_leave/view',
			method: 'GET',
			params,
			custom: {
				showSuccess: false,
				successMsg: '',
				showError: true,
				errorMsg: '',
				showLoading: false,
				loadingMsg: '加载中',
				auth: true,
			},
		}),
        //请假审批
    getLeaveApproveList: (params) =>
		request({
			url: 'api/ask_leave/approve_list',
			method: 'GET',
			params,
			custom: {
				showSuccess: false,
				successMsg: '',
				showError: true,
				errorMsg: '',
				showLoading: true,
				loadingMsg: '加载中',
				auth: true,
			},
		}),
    // 请假审批通过
	getLeaveApproveListPass: (params) =>
		request({
			url: 'api/ask_leave/pass',
			method: 'GET',
			params,
			custom: {
				showSuccess: true,
				successMsg: '',
				showError: true,
				errorMsg: '',
				showLoading: false,
				loadingMsg: '加载中',
				auth: true,
			},
		}),
// 请假审批拒绝
	postLeaveApproveListRefuse: (params) =>
		request({
			url: 'api/ask_leave/refuse',
			method: 'POST',
			params,
			custom: {
				showSuccess: true,
				successMsg: '',
				showError: true,
				errorMsg: '',
				showLoading: false,
				loadingMsg: '加载中',
				auth: true,
			},
		}),
	// 劳务派遣请假申请列表
	labor_dispatching_leave_List: (params) =>
		request({
			url: '/api/ask_leave_project/index',
			method: 'GET',
			params,
			custom: {
				showSuccess: true,
				successMsg: '',
				showError: true,
				errorMsg: '',
				showLoading: false,
				loadingMsg: '加载中',
				auth: true,
			},
		}),
		// 劳务派遣请假申请新增
	labor_dispatching_leave_Add: (params) =>
		request({
			url: '/api/ask_leave_project/add',
			method: 'POST',
			params,
			custom: {
				showSuccess: true,
				successMsg: '',
				showError: true,
				errorMsg: '',
				showLoading: false,
				loadingMsg: '加载中',
				auth: true,
			},
		}),
		// 劳务派遣请假申请详情
	labor_dispatching_leave_View: (params) =>
		request({
			url: '/api/ask_leave_project/view',
			method: 'GET',
			params,
			custom: {
				showSuccess: true,
				successMsg: '',
				showError: true,
				errorMsg: '',
				showLoading: false,
				loadingMsg: '加载中',
				auth: true,
			},
		}),
		// 劳务派遣请假申请审批列表
	labor_dispatching_leave_Approve_list: (params) =>
		request({
			url: '/api/ask_leave_project/approve_list',
			method: 'GET',
			params,
			custom: {
				showSuccess: true,
				successMsg: '',
				showError: true,
				errorMsg: '',
				showLoading: false,
				loadingMsg: '加载中',
				auth: true,
			},
		}),
		// 劳务派遣请假申请审批同意
	labor_dispatching_leave_Pass: (params) =>
		request({
			url: '/api/ask_leave_project/pass',
			method: 'POST',
			params,
			custom: {
				showSuccess: true,
				successMsg: '',
				showError: true,
				errorMsg: '',
				showLoading: false,
				loadingMsg: '加载中',
				auth: true,
			},
		}),
		// 劳务派遣请假申请审批拒绝
	labor_dispatching_leave_Refuse: (params) =>
		request({
			url: '/api/ask_leave_project/refuse',
			method: 'POST',
			params,
			custom: {
				showSuccess: true,
				successMsg: '',
				showError: true,
				errorMsg: '',
				showLoading: false,
				loadingMsg: '加载中',
				auth: true,
			},
		}),
}